

import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Stage here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Stage  extends World
{
    private ryu ryu;
    public int vidas = 3;
    /**
     * Constructor for objects of class Stage.
     * 
     */
    public Stage()
    {    
        super(1200, 750, 1); 
        Menu();
    }
    public void Menu()
    {
        removeObjects(getObjects(null));
        setBackground("Portada.png");
        //Greenfoot.playSound("GameT.wma");
        addObject(new Inicio(),390,200);
        addObject(new Creditos(),250,710);
        addObject(new Ayuda(),390,410);
    }
    public void Inicio()
    {
        getObjects(ryu.class);
        getObjects(vidas.class);
        getObjects(EnergyBall.class);
        getObjects(EnergyBall2.class);
        getObjects(Enemigo.class);
        
        Nivel1();
    }
    public void Ayuda()
    {
        removeObjects(getObjects(null));
        setBackground("Ayuda.png");
        addObject(new Menu(),290,700);
    }
    public void Creditos()
    {
        removeObjects(getObjects(null));
        setBackground("Creditos.png");
        addObject(new Menu(),300,690);
    }
    public void Nivel1()
    {
        removeObjects(getObjects(null));
        setBackground("Nivel1.jpg");
        addObject(new ryu(),124, 700);
        addObject(new Enemigo(),624, 700);
        addObject(new Enemigo(),824, 700);
        addObject(new Enemigo(),1000, 700);
    }
    public void Nivel2()
    {
        removeObjects(getObjects(null));
        setBackground("Nivel2.jpg");
        addObject(new ryu2(),124, 700);
        addObject(new Enemigo2(),624, 650);
        addObject(new Enemigo2(),824, 650);
        addObject(new Enemigo2(),1000, 650);
        addObject(new Enemigo2(),1200, 650);
    }
    public void Nivel3()
    {
        removeObjects(getObjects(null));
        setBackground("Nivel3.jpg");
        addObject(new ryu3(),124, 700);
        addObject(new Enemigo3(),624, 700);
        addObject(new Enemigo3(),824, 700);
        addObject(new Enemigo3(),1000, 700);
        addObject(new Enemigo3(),1000, 500);
        addObject(new Enemigo3(),1200, 700);
    }
    public void NivelF()
    {
        removeObjects(getObjects(null));
        setBackground("NivelF.jpg");
        addObject(new ryuF(),124, 700);
        addObject(new Enemigo(),624, 700);
        addObject(new Enemigo2(),824, 650);
        addObject(new Enemigo3(),1000, 500);
        addObject(new Boss(),1100, 600);
    }

}

